package tn.softcom.dfbuilder.modele;

public class RapportADJG implements Comparable<RapportADJG>,Cloneable{
	private String PLMN_Name;	
	private String Source_RNC_Name;	
	private String Source_WBTS_Name;	
	private String Source_WCEL_Name	;
	private String Source_WCEL_adjacencies;
	private String Source_WCEL_LCR_ID	;
	private String Source_WCEL_ID	;
	private String Target_Segment_Name;	
	private String Target_BTS_Name;	
	private String Target_LAC_ID	;
	private String Target_CELL_ID	;
	private String Neighbor	;
	private String Att	;
	private String Share;	
	private String SR_per_adjacency;	
	private String Avg_GSM_RSSI	;
	private String Avg_BSIC_verif_time;
	
	private String idToRetreve;
	private GpsData gpsData;
	private Double distanceWithSource;
	
	
	
	public String getPLMN_Name() {
		return PLMN_Name;
	}
	public void setPLMN_Name(String pLMN_Name) {
		PLMN_Name = pLMN_Name;
	}
	public String getSource_RNC_Name() {
		return Source_RNC_Name;
	}
	public void setSource_RNC_Name(String source_RNC_Name) {
		Source_RNC_Name = source_RNC_Name;
	}
	public String getSource_WBTS_Name() {
		return Source_WBTS_Name;
	}
	public void setSource_WBTS_Name(String source_WBTS_Name) {
		Source_WBTS_Name = source_WBTS_Name;
	}
	public String getSource_WCEL_Name() {
		return Source_WCEL_Name;
	}
	public void setSource_WCEL_Name(String source_WCEL_Name) {
		Source_WCEL_Name = source_WCEL_Name;
	}
	public String getSource_WCE_adjacencies() {
		return Source_WCEL_adjacencies;
	}
	public void setSource_WCEL_adjacencies(String source_WCE_adjacencies) {
		Source_WCEL_adjacencies = source_WCE_adjacencies;
	}
	public String getSource_WCEL_LCR_ID() {
		return Source_WCEL_LCR_ID;
	}
	public void setSource_WCEL_LCR_ID(String source_WCEL_LCR_ID) {
		Source_WCEL_LCR_ID = source_WCEL_LCR_ID;
	}
	public String getSource_WCEL_ID() {
		return Source_WCEL_ID;
	}
	public void setSource_WCEL_ID(String source_WCEL_ID) {
		Source_WCEL_ID = source_WCEL_ID;
	}
	public String getTarget_Segment_Name() {
		return Target_Segment_Name;
	}
	public void setTarget_Segment_Name(String target_Segment_Name) {
		Target_Segment_Name = target_Segment_Name;
	}
	public String getTarget_BTS_Name() {
		return Target_BTS_Name;
	}
	public void setTarget_BTS_Name(String target_BTS_Name) {
		Target_BTS_Name = target_BTS_Name;
	}
	public String getTarget_LAC_ID() {
		return Target_LAC_ID;
	}
	public void setTarget_LAC_ID(String target_LAC_ID) {
		Target_LAC_ID = target_LAC_ID;
	}
	public String getTarget_CELL_ID() {
		return Target_CELL_ID;
	}
	public void setTarget_CELL_ID(String target_CELL_ID) {
		Target_CELL_ID = target_CELL_ID;
	}
	public String getNeighbor() {
		return Neighbor;
	}
	public void setNeighbor(String neighbor) {
		Neighbor = neighbor;
	}
	public String getAtt() {
		return Att;
	}
	public void setAtt(String att) {
		Att = att;
	}
	public String getShare() {
		return Share;
	}
	public void setShare(String share) {
		Share = share;
	}
	public String getSR_per_adjacency() {
		return SR_per_adjacency;
	}
	public void setSR_per_adjacency(String sR_per_adjacency) {
		SR_per_adjacency = sR_per_adjacency;
	}
	public String getAvg_GSM_RSSI() {
		return Avg_GSM_RSSI;
	}
	public void setAvg_GSM_RSSI(String avg_GSM_RSSI) {
		Avg_GSM_RSSI = avg_GSM_RSSI;
	}
	public String getAvg_BSIC_verif_time() {
		return Avg_BSIC_verif_time;
	}
	public void setAvg_BSIC_verif_time(String avg_BSIC_verif_time) {
		Avg_BSIC_verif_time = avg_BSIC_verif_time;
	}
	public String getIdToRetreve() {
		return idToRetreve;
	}
	public void setIdToRetreve(String idToRetreve) {
		this.idToRetreve = idToRetreve;
	}
	public GpsData getGpsData() {
		return gpsData;
	}
	public void setGpsData(GpsData gpsData) {
		this.gpsData = gpsData;
	}
	public Double getDistanceWithSource() {
		return distanceWithSource;
	}
	public void setDistanceWithSource(Double distanceWithSource) {
		this.distanceWithSource = distanceWithSource;
	}

	@Override
	public int compareTo(RapportADJG o) {
		int result =  Double.valueOf(Att).compareTo(Double.valueOf(o.getAtt()));
//		if(result == 0)
//			result = Avg_CPICH.compareTo(o.getAvg_CPICH());
//		if(result == 0)
//			result =  Ec_No_CPICH_RSCP_SHO.compareTo(o.getEc_No_CPICH_RSCP_SHO()) ;
		if( o.getDistanceWithSource()!=null && distanceWithSource!=null){
			if(result == 0)
				result =  o.getDistanceWithSource().compareTo(distanceWithSource);
		}
		return result;
	}

	public Object clone() {
    	Object o = null;
    	try {
      		o = super.clone();
    	} catch(CloneNotSupportedException cnse) {
      		cnse.printStackTrace(System.err);
	    }
	    return o;
  	}
}
